<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 双向绑定的简单使用 -->
    <div id="app">
        <label for="">
            <input type="text" v-model="name">
        </label>
        <div> {{ name }} </div>
        <button @click="changeData">改变一下数据</button>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        const app = new Vue({
            el:'#app',
            data(){
                return {
                    name:'王某'
                }
            },
            methods:{
                changeData(){
                    this.name = '但多多少少'
                }
            }
        })
    </script>
</body>
</html>